int ascii_to_integer(char* string) {
    int num = 0;
    while(*string <= '9' && *string >= '0') {
        num = num * 10 + (*string - '0');
        string++;
    }
    if(*string != '\0')
        return 0;
    return num;
}